//author: create by SunJH
//时间: 2021/11/25 0025
//邮箱: 965989158@qq.com
//描述: 另外一个getView测试页面

import 'package:flutter/material.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_app/getx/getview_controller.dart';
import 'package:flutter_app/openeye/widget/app_bar.dart';
import 'package:flutter_app/stateLearn/click_txt.dart';
import 'package:get/get.dart';

class GetViewTwoTest extends GetWidget<GetViewControllerTest>{
  const GetViewTwoTest({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Get.put(GetViewControllerTest());
    return Scaffold(
      appBar: appBar("GetView测试2"),
      body: Container(
        alignment: Alignment.center,
        child: Column(
          children: [
            Obx(() => Text("当前值是:${controller.number}")),
            ClickTxt(info: "增加值", onPressed: (){
              controller.increment();
            }),
            ClickTxt(info: "跳转到另外一个GetView", onPressed: (){
              Navigator.pushNamed(context, "getViewOneTest");
            }),

          ],
        ),
      ),
    );
  }

}